package com.zhangtai.modules.service.security;


import com.zhangtai.modules.entity.security.SecurityBatchEntity;
import com.zhangtai.utils.PageResult;
import com.zhangtai.utils.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.List;


/**
 * 
 *
 * @author chenshun
 * @email sunlightcs@gmail.com
 * @date 2020-10-12 10:40:19
 */

public interface SecurityBatchService {

    @GetMapping("/findSecurityBatchList")
    @ApiOperation(value = "分页查询")
    PageResult<SecurityBatchEntity> queryPage(@RequestParam(value = "unitName", required = false) String unitName,
                         @RequestParam(value = "orgName", required = false) String orgName,
                         @RequestParam(value = "name", required = false) String name,
                         @RequestParam(value = "time", required = false) String time,
                                              @RequestParam(value = "endTime", required = false) String endTime,
                                              @RequestParam(value = "type", required = false) Integer type,
                         @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
                         @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize);


    PageResult<SecurityBatchEntity> queryPageAuth(
            @RequestParam(value = "contractIds",required = false) List<Long> contractIds,
            @RequestParam(value = "unitName", required = false) String unitName,
                                              @RequestParam(value = "orgName", required = false) String orgName,
                                              @RequestParam(value = "name", required = false) String name,
                                              @RequestParam(value = "time", required = false) String time,
                                              @RequestParam(value = "endTime", required = false) String endTime,
                                              @RequestParam(value = "type", required = false) Integer type,
                                              @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
                                              @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize);


    @GetMapping("/infoSecurityBatch")
    @ApiOperation(value = "根据id查找")
    SecurityBatchEntity getByIdE(@RequestParam("id") Long id);

    @PostMapping("/saveSecurityBatch")
    @ApiOperation(value = "保存")
    R saveE(@RequestBody SecurityBatchEntity entity);

    @PostMapping("/updateSecurityBatch")
    @ApiOperation(value = "修改")
    R updateByIdE(@RequestBody SecurityBatchEntity entity);

    @GetMapping("/deleteOneSecurityBatch")
    @ApiOperation(value = "根据ID删除")
    R removeOneById(@RequestParam("id") Long id);

    @PostMapping("/deleteSecurityBatchs")
    @ApiOperation(value = "根据ID集合删除")
    R removeByIdsE(@RequestBody List<Long> ids);
}

